{ Statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=914
  Verdict: Accepted
}
uses
	SysUtils, Math;
 
var  	
	i, n : longint;
	a, b, t : int64;
 
begin
	reset(input,'input.txt');
	rewrite(output,'output.txt');
	read(n);
	a := 8;
	b := 3;
	if n = 1 then write(3) else begin
		for i := 3 to n do begin
			t := a;
			a := (a + b) shl 1;
			b := t;
		end;
		write(a);
	end;
end.